function demoDrawableLines(delay)
% Demonstrate drawing one or more lines, allow visual inspection.

if nargin < 1
    delay = 2;
end

% access the manager that deals with drawing
dotsTheDrawablesManager.reset();
dm = dotsTheDrawablesManager.theObject;
dm.openScreenWindow;

% create an arcs object and add it to an arbitrary group
l = dm.newObject('dotsDrawableLines');
group = 'demo';
dm.addObjectToGroup(l, group);
dm.activateGroup(group);

% "draw" invisivle lines
l.isVisible = false;
dm.mayDrawNextFrame();
pause(delay);

% "draw" zero lines
l.isVisible = true;
l.xFrom = [];
l.xTo = [];
l.yFrom = [];
l.yTo = [];
dm.mayDrawNextFrame();
pause(delay);

% draw one line
l.xFrom = 0;
l.xTo = 1;
l.yFrom = 0;
l.yTo = 10;
dm.mayDrawNextFrame();
pause(delay);

% draw a fat line
l.width = 10;
l.color = [255 0 0];
dm.mayDrawNextFrame();
pause(delay);

% draw many lines
n = 24;
l.xFrom = linspace(-4, -5, n);
l.xTo = linspace(10, 12, n);
l.yFrom = linspace(-9, -8, n);
l.yTo = linspace(0, 10, n);
l.width = 1;
l.color = [16 128 64];
dm.mayDrawNextFrame();
pause(delay);

% draw antialiased lines
l.smooth = true;
dm.mayDrawNextFrame();
pause(delay);

% close the OpenGL drawing window
dm.closeScreenWindow;